<?php
class AjaxController extends VTController{
	function getUserShippingAction(){
		$user_id = $this->getPost('user_id');
		$userDataService = new UserDataService();
		$orderShippingDataService = new OrderShippingDataService();
		$userEntity = $userDataService->getById($user_id);
		if($userEntity){
			$image = $userEntity->getImage();
		}else{
			$image = '';
		}
		$total = $orderShippingDataService->getTotalsUserShipping($user_id);
		echo Zend_Json::encode(array('userEntity' => $userEntity, 'total' => $total, 'image' => $image));
		exit();
	}
}